Optimal. Leaf size=194 \[ \frac {2 a^{3/2} \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}-\frac {2 a^2 \tan (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {2 a^3 \tan ^3(c+d x)}{3 d (a+a \sec (c+d x))^{3/2}}+\frac {14 a^4 \tan ^5(c+d x)}{5 d (a+a \sec (c+d x))^{5/2}}+\frac {10 a^5 \tan ^7(c+d x)}{7 d (a+a \sec (c+d x))^{7/2}}+\frac {2 a^6 \tan ^9(c+d x)}{9 d (a+a \sec (c+d x))^{9/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3972, 472, 209}
\begin {gather*} \frac {2 a^{3/2} \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}+\frac {2 a^6 \tan ^9(c+d x)}{9 d (a \sec (c+d x)+a)^{9/2}}+\frac {10 a^5 \tan ^7(c+d x)}{7 d (a \sec (c+d x)+a)^{7/2}}+\frac {14 a^4 \tan ^5(c+d x)}{5 d (a \sec (c+d x)+a)^{5/2}}+\frac {2 a^3 \tan ^3(c+d x)}{3 d (a \sec (c+d x)+a)^{3/2}}-\frac {2 a^2 \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 472
Rule 3972
Rubi steps
\begin {align*} \int (a+a \sec (c+d x))^{3/2} \tan ^4(c+d x) \, dx &=-\frac {\left (2 a^4\right ) \text {Subst}\left (\int \frac {x^4 \left (2+a x^2\right )^3}{1+a x^2} \, dx,x,-\frac {\tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=-\frac {\left (2 a^4\right ) \text {Subst}\left (\int \left (-\frac {1}{a^2}+\frac {x^2}{a}+7 x^4+5 a x^6+a^2 x^8+\frac {1}{a^2 \left (1+a x^2\right )}\right ) \, dx,x,-\frac {\tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=-\frac {2 a^2 \tan (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {2 a^3 \tan ^3(c+d x)}{3 d (a+a \sec (c+d x))^{3/2}}+\frac {14 a^4 \tan ^5(c+d x)}{5 d (a+a \sec (c+d x))^{5/2}}+\frac {10 a^5 \tan ^7(c+d x)}{7 d (a+a \sec (c+d x))^{7/2}}+\frac {2 a^6 \tan ^9(c+d x)}{9 d (a+a \sec (c+d x))^{9/2}}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {2 a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}-\frac {2 a^2 \tan (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {2 a^3 \tan ^3(c+d x)}{3 d (a+a \sec (c+d x))^{3/2}}+\frac {14 a^4 \tan ^5(c+d x)}{5 d (a+a \sec (c+d x))^{5/2}}+\frac {10 a^5 \tan ^7(c+d x)}{7 d (a+a \sec (c+d x))^{7/2}}+\frac {2 a^6 \tan ^9(c+d x)}{9 d (a+a \sec (c+d x))^{9/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 6.50, size = 123, normalized size = 0.63 \begin {gather*} \frac {a \sec \left (\frac {1}{2} (c+d x)\right ) \sec ^4(c+d x) \sqrt {a (1+\sec (c+d x))} \left (2520 \sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \cos ^{\frac {9}{2}}(c+d x)+126 \sin \left (\frac {1}{2} (c+d x)\right )-288 \sin \left (\frac {5}{2} (c+d x)\right )-315 \sin \left (\frac {7}{2} (c+d x)\right )-169 \sin \left (\frac {9}{2} (c+d x)\right )\right )}{2520 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(406\) vs.
\(2(170)=340\).
time = 0.18, size = 407, normalized size = 2.10
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (315 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}}+945 \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+945 \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+315 \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}+2704 \left (\cos ^{5}\left (d x +c \right )\right )+1168 \left (\cos ^{4}\left (d x +c \right )\right )-3488 \left (\cos ^{3}\left (d x +c \right )\right )-1744 \left (\cos ^{2}\left (d x +c \right )\right )+800 \cos \left (d x +c \right )+560\right ) a}{2520 d \cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}\) | \(407\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.30, size = 371, normalized size = 1.91 \begin {gather*} \left [\frac {315 \, {\left (a \cos \left (d x + c\right )^{5} + a \cos \left (d x + c\right )^{4}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) - 2 \, {\left (169 \, a \cos \left (d x + c\right )^{4} + 242 \, a \cos \left (d x + c\right )^{3} + 24 \, a \cos \left (d x + c\right )^{2} - 85 \, a \cos \left (d x + c\right ) - 35 \, a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4}\right )}}, -\frac {2 \, {\left (315 \, {\left (a \cos \left (d x + c\right )^{5} + a \cos \left (d x + c\right )^{4}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) + {\left (169 \, a \cos \left (d x + c\right )^{4} + 242 \, a \cos \left (d x + c\right )^{3} + 24 \, a \cos \left (d x + c\right )^{2} - 85 \, a \cos \left (d x + c\right ) - 35 \, a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )\right )}}{315 \, {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}} \tan ^{4}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.12, size = 310, normalized size = 1.60 \begin {gather*} -\frac {\frac {315 \, \sqrt {-a} a^{2} \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{{\left | a \right |}} + \frac {2 \, {\left (315 \, \sqrt {2} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (1470 \, \sqrt {2} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (756 \, \sqrt {2} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + {\left (\sqrt {2} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 162 \, \sqrt {2} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{4} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{315 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^4\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________